import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: resolve =>
      require(["@/components/login/Login.vue"], resolve)
    },
    {
      path: "/login",
      component: resolve =>
        require(["@/components/login/Login.vue"], resolve)
    },

    {
      path: "/main",
      component: resolve =>
        require(["@/components/common/Main.vue"], resolve),
      children: [
        {
          path: "/",
          component: resolve =>
          require(["@/components/common/Base.vue"], resolve)
        },
        {
          path: "home/img",
          component: resolve =>
          require(["@/components/home/HomeImg.vue"], resolve)
        },
        {
          path: "home/cert",
          component: resolve =>
          require(["@/components/home/HomeCert.vue"], resolve)
        },
        {
          path: "news",
          component: resolve =>
          require(["@/components/news/News.vue"], resolve)
        },
        {
          path: "help",
          component: resolve =>
          require(["@/components/help/Help.vue"], resolve)
        },
        {
          path: "address",
          component: resolve =>
          require(["@/components/about/Address.vue"], resolve)
        },
        {
          path: "user",
          component: resolve =>
          require(["@/components/user/User.vue"], resolve)
        },
      ],
    },

    {
      path: '/hello',
      component: resolve =>
          require(["@/components/HelloWorld.vue"], resolve)
    }

  ]
})
